#include <QtGui/QApplication>
#include "MainWindow.hpp"
#include "GLWidget.hpp"
#include "glew.h"
#include "Logger.hpp"

int main(int argc, char *argv[])
{   
    QApplication a(argc, argv);

    Logger::initializeFile( "WorldGen.log" );
    Logger::write( "Beginning WorldGen @ " +
                   QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss" ),
                   Logger::Note );

    Logger::write( "Enabled", Logger::Note );
    Logger::write( "Enabled", Logger::Debug );
    Logger::write( "Enabled", Logger::Warning );
    Logger::write( "Enabled", Logger::Error );
#ifdef SIN_COS_EXTRA_PRECISION
    Logger::write( "Enabled extra precision for sin/cos", Logger::Note );
#else
    Logger::write( "Disbled extra precision for sin/cos", Logger::Note );
#endif // #ifdef SIN_COS_EXTRA_PRECISION

    MainWindow w;
    w.show();
    int result = a.exec();

    Logger::write( "Finishing WorldGen @ " +
                   QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss" ),
                   Logger::Note );
    Logger::releaseFile();

    return result;
}
